﻿/**
 *    Copyright 2006 - 2011 Opera Software ASA
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 *
 **/


// Autogenerated by hob
window.cls || (window.cls = {});
cls.EcmascriptDebugger || (cls.EcmascriptDebugger = {});
cls.EcmascriptDebugger["6.0"] || (cls.EcmascriptDebugger["6.0"] = {});

cls.EcmascriptDebugger["6.0"].ConsoleTraceInfo = function(arr)
{
  this.runtimeID = arr[0];
  /**
    * The list of stack frames at the level console.trace was called.
    */
  this.frameList = (arr[1] || []).map(function(item)
  {
    return new cls.EcmascriptDebugger["6.0"].BacktraceFrame(item);
  });
};

cls.EcmascriptDebugger["6.0"].BacktraceFrame = function(arr)
{
  this.functionID = arr[0];
  this.argumentObject = arr[1];
  this.variableObject = arr[2];
  this.thisObject = arr[3];
  /**
    * TODO: Spec says repeated, while the code only assumes one (optional)
    */
  this.objectValue = arr[4] ? new cls.EcmascriptDebugger["6.0"].ObjectValue(arr[4]) : null;
  this.scriptID = arr[5];
  this.lineNumber = arr[6];
};

cls.EcmascriptDebugger["6.0"].ObjectValue = function(arr)
{
  this.objectID = arr[0];
  this.isCallable = arr[1];
  /**
    * type, function or object
    */
  this.type = arr[2];
  this.prototypeID = arr[3];
  /**
    * The class of the object.
    */
  this.className = arr[4];
  /**
    * If the object is a function, this is the name of
    * the variable associated with that function (if any).
    */
  this.functionName = arr[5];
};

